In some devices, program code or data is divided into segments called overlays or overlay segments. One or more of the overlay segments are copied from secondary storage into main memory as needed during device runtime.